<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page pageEncoding="UTF-8" %>
<%@ include file="../common/common.jsp"%>
<%@ page import="jp.co.technotree.apl.api.common.Message" %>
<%@ page import="jp.co.technotree.apl.cmd.spare.Spa1000Bean,jp.co.technotree.apl.api.common.GlobalConst;" %>
<jsp:useBean id="formBean" class="jp.co.technotree.apl.cmd.spare.Spa1000Bean" scope="request" />
<%
	String userId = formBean.getUserId();
	String userNm = formBean.getUserNm();

    if(userNm == null) userNm="";

    Spa1000Bean.Record[] recordList = formBean.getRecordList();
  //--------------------------------------------ページングＳＴＡＲＴ------------------------------------------------------------------------
  	Spa1000Bean.PagerData[] pagerDataList = formBean.getPagerDataList();

  	int nowPageNo = formBean.getPageNo();


  	//初期ページが0になっていたら1にする
  	if(nowPageNo == 0){
  		nowPageNo = 1;
  	}

  	int prevPageNo = nowPageNo - 1;
  	int nextPageNo = nowPageNo + 1;

  	int stPage = 1;
  	int edPage = 0;


  	if(pagerDataList != null){
  		edPage = pagerDataList.length;
  	}

  	int startLoopNum = formBean.getStartLoopNum();
  	int endLoopNum = formBean.getEndLoopNum();
  	int sideNum = 5;

  	boolean isPrev = (nowPageNo != stPage);
  	boolean isNext = (nowPageNo != edPage);
  	boolean isMinPrev = (nowPageNo - sideNum > stPage);
  	boolean isMaxNext = (nowPageNo + sideNum < edPage);
  	//--------------------------------------------ページングＥＮＤ------------------------------------------------------------------------
%>
<html>
<head>
<title>予備品管理システム - 予備品情報一覧画面</title>
<link rel="SHORTCUT ICON" href="../common/img/default/sys_icon.ico">

<link rel='stylesheet' type='text/css' href='../../common/css/common/base.css' >
<link rel='stylesheet' type='text/css' href='../../common/css/common/common.css'>
<link rel='stylesheet' type='text/css' href='../../common/css/spare/spa4000.css'>

<script language="javascript" src="../../common/js/base.js"></script>
<script language="javascript" src="../../common/js/menu/topmenu.js"></script>

<!-- ITEM-DROPDOWN START -->
<link rel="stylesheet" href="../../common/js/dropdown/dropdown.css" type="text/css">
<script src="../../common/js/dropdown/dropdown.js" type="text/javascript"></script>
<!-- ITEM-DROPDOWN END -->

<!--ポップアップ用-->
<link rel='stylesheet' type='text/css' href='../../common/css/popUp.css' >
<script type='text/javascript' src='../../common/js/popUp.js'></script>

<!-- システムログ -->
<script src="../../common/js/systemlog.js"></script>

<style type='text/css'>
	.LinkItem {
		cursor: pointer;
	}
	.div-wid {
		border-bottom:solid 1px #ccc;
		width:1340px; /* 横幅合計 + スクロールバー分 */
		height:400px;
		overflow:auto;
	}
	.TblField1{
		width:40px;
	}
	.TblField2{
		width:180px;
	}
	.TblField3{
		width:350px;
	}
	.TblField4{
		width:350px;
	}
	.TblField5{
		width:120px;
	}
	.TblField6{
		width:80px;
	}
	.TblField7{
		width:50px;
	}
	.TblField8{
		width:50px;
	}
	.TblField9{
		width:50px;
	}
	.TblField10{
		width:50px;
	}
	.ReadStyle{
		 background-color:#CCC;
	}
	.txtmode1 {
		ime-mode: active;   /* 全角モード */
	}
	.txtmode2 {
		ime-mode: inactive; /* 半角モード */
	}
	.txtmode3 {
		ime-mode: disabled; /* 半角のみモード */
	}
</style>

<script language="javascript">

//画面固定
//document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);

function onInit(){
	<%if("1".equals(formBean.getErrMsgFlg())){%>
		alert_Custom("<%=Message.getMessage("WRN01070")%>");
	<%}%>
	//-------------------------------------------------------------------------
	//<!-- ITEM-DROPDOWN START -->
	var panel = document.getElementById("dropdown-panel");
	var input = document.getElementById("addTable");
	var targetList = getElementsByClassName(input,"input","item",true);

	dropdown = new CItemDropDownList(targetList,panel,"drop-contents");
	dropdown.setKeyUpEvent(text_onKeyUp);
	dropdown.setSelectEvent(list_onSelect);

	//
	dropdown.serverURL="../itm1099/itm1099";
	//<!-- ITEM-DROPDOWN END -->
	//-------------------------------------------------------------------------

	//-------------------------------------------------------------------------
	//<!-- RACKNO-DROPDOWN START -->
	var panel2 = document.getElementById("dropdown-panel2");
	var input2 = document.getElementById("addTable");
	var targetList2 = getElementsByClassName2(input2,"input","rackNo",true);
	dropdown2 = new CItemDropDownList(targetList2,panel2,"drop-contents2");
	dropdown2.setKeyUpEvent(text_onKeyUp2);
	dropdown2.setSelectEvent(list_onSelect2);
	dropdown2.serverURL="../sys1099/sys1099";

	//
	dropdown2.createTable=function(object,sender,json) {
		var itemList = this.itemList;
		var tableText = "<table cellspacing='0' cellpadding='0' border='0' id='"+this.tableName+"'>";
		if (itemList!=null && itemList.length!=0) {
			for ( var i=0; itemList && i<itemList.length; i++ ){
				var item = itemList[i];

				tableText+= "<tr>";
				tableText+= "<td>"+item.value1+"</td>";
				tableText+= "</tr>";
			}
		} else {
			tableText+= "<tr>";
			tableText+= "<td>該当なし</td>";
			tableText+= "</tr>";
			tableText+= "</table>";
		}
		tableText+= "</table>";

		var canvas = document.getElementById(this.canvasName);
		canvas.innerHTML=tableText;
	}
	//<!-- RACKNO-DROPDOWN END -->
	//-------------------------------------------------------------------------

}


function nextPageJump(nextPage){
	mainForm = document.getElementById("F1");
	document.getElementById("nextPage").value = nextPage;
	mainForm.submit();
}

//登録ボタンからの遷移
function insertPageJump(nextPage,dataId,dataSts){
	mainForm = document.getElementById("F1");
	document.getElementById("nextPage").value = nextPage;
	document.getElementById("dataId").value = dataId;
	document.getElementById("dataSts").value = dataSts;
	mainForm.submit();
}

//通常検索
function formSubmit() {
	var frm = document.main;
	//if(frm.findOdrDtYear.value){
		frm.cmd.value = "cmd01";
		frm.submitFlag.value = "1";
		//ページ番号初期化
		frm.pageNo.value ="1";
		frm.submit();
	//}else{
	//	alert_Custom("<%=Message.getMessage("WRN00010").replace("$1","発注日（年）")%>");
	//}
}
//ソート
function changeColumnSort(key) {
	var formName = "main";
	var formObj = document[formName];
	formObj.columnSortSelect.value = key;
	formObj.submitFlag.value = "1";
	//ページ番号初期化
	formObj.pageNo.value ="1";

	formSubmit();
}

//-------------------------------------------------------------------------
//<!-- ポップアップ START -->

//パップアップ解除
function back(){
	document.getElementById("opAlertBtn").style.display = "none";
	document.getElementById("opAlert").style.display = "none";
	document.getElementById("opAlertButton").style.display = "none";
	document.getElementById("opAlertTop").style.display = "none";
	document.getElementById("allbackgr").style.display = "none";
}

//<!-- ポップアップ END -->
//-------------------------------------------------------------------------

//-------------------------------------------------------------------------
//<!-- ITEM-DROPDOWN START -->
var dropdown = null;

var inputDateTime = null;
var timerId = null;
var eventSrc={};
function text_onKeyUp(object,sender,evt){
	var value = sender.value;
	eventSrc.object = object;
	eventSrc.sender = sender;
	eventSrc.evt = evt;
	inputDateTime = new Date();
	//-----------------------------------------------
	//品番自動ハイフン「-」を付ける
	var chkLen=5;
	if(event.keyCode != 0008){
		//指定の桁以上ならスタート
		if(value.length>=chkLen){
			var hikaku = value.substring(chkLen, chkLen+1);
			if(hikaku != "-"){
				var frontValue = value.substring(0, chkLen);
				var backValue  = value.substring(chkLen, value.length);
				sender.value=frontValue+"-"+backValue;
			}
		}
	}
	//小文字を大文字へ
	sender.value = sender.value.toUpperCase();
	value = sender.value;
	//-----------------------------------------------
	if ( value.length >= <%=formBean.getGohoKensu() %> ){
		if ( evt.keyCode == 37 || evt.keyCode == 39 ){

		}else{
			if ( timerId == null ){
				// 連続送信防止
				timerId = window.setTimeout(function(){text_onTimeOut(object,sender,evt);},500);
			}
		}
	}
}

/**
* 一定時間入力が止まった場合に動作
*/
function text_onTimeOut(object,sender,evt){
	var nowDateTime = new Date();
	var lngTime = (nowDateTime.getTime()-inputDateTime.getTime());
	if ( lngTime >= 1000 ){
		timerId = null;
		xmlRequest(object,sender,evt);
	}else{
		timerId = window.setTimeout(function(){text_onTimeOut(eventSrc.object,eventSrc.sender,eventSrc.evt);},500);
	}
}

/**
* XML要求処理
*/
function xmlRequest(object,sender,evt){
	//alert_Custom(evt.keyCode);
	var table = document.getElementById("drop-contents");
	table.innerHTML="";

	var top = calculateOffsetTop(sender);
	var left = calculateOffsetLeft(sender);
	var height = sender.offsetHeight;
	var panel = document.getElementById("dropdown-panel");
	panel.style.top=top+height+"px";
	panel.style.left=left+"px";
	panel.style.display="block";

	var param="";

	var findRsvDiv = document.getElementById("findRsvDiv").value;
	
	if(findRsvDiv == "1"){
		//直結看板以外
		param = "itemCd="+sender.value+"&rsvDiv=1&tempFlg=0";
	}else if(findRsvDiv == "0"){
		//直結看板
		param = "itemCd="+sender.value+"&rsvDiv=0&tempFlg=0";
	}
	
	try {
		var frm = document.main;
		var objs = frm["invCate"];
		if (objs[1].checked == true){
			//仮入出庫
			param += "&afterProc=1";
		}
	} catch (e) {

	}

	object.doXmlRequest(object,sender,param);
}


/**
* リスト選択時コールバック処理
*/
function list_onSelect(object,sender,json){
	var panel = document.getElementById("dropdown-panel");
	panel.style.display="none";
	sender.focus();

	//----------
	var name=sender.name;
	var idx=name.substring(name.indexOf("[")+1,name.length-1);

	document.getElementById("findItemNo").value=json.itemcd;

}


function getElementsByClassName(parent,tagName,className,fullMatch){
	var i=0,j=0;
	var result = [], cnt = 0;
	var list = parent.getElementsByTagName(tagName);
	for ( i=0; i<list.length; i++ ){
		var name = list[i].className;
		if ( name ){
			var nameList = name.split(' ');
			for ( j=0; j<nameList.length; j++ ){
				if ( fullMatch ){
					if ( nameList[j] == className ){
						result[cnt++] = list[i];
					}
				}else{
					if ( nameList[j].indexOf(className) != -1 ){
						result[cnt++] = list[i];
					}
				}
			}
		}
	}
	return result;
}
function closeBtn(){
	var panel = document.getElementById("dropdown-panel");
	panel.style.display="none";
}
//----------------------------------------------------------------------

//-------------------------------------------------------------------------
//<!-- RACKNO-DROPDOWN START -->
var dropdown2 = null;

var inputDateTime2 = null;
var timerId2 = null;
var eventSrc2={};
function text_onKeyUp2(object,sender,evt){
	var value = sender.value;
	eventSrc2.object = object;
	eventSrc2.sender = sender;
	eventSrc2.evt = evt;
	inputDateTime2 = new Date();
	//-----------------------------------------------
	//品番自動ハイフン「-」を付ける
	var chkLen=2;
	if(event.keyCode != 0008){
		//指定の桁以上ならスタート
		if(value.length>=chkLen){
			var hikaku = value.substring(chkLen, chkLen+1);
			if(hikaku != "-"){
				var frontValue = value.substring(0, chkLen);
				var backValue  = value.substring(chkLen, value.length);
				sender.value=frontValue+"-"+backValue;
			}
		}
	}
	//品番自動ハイフン「-」を付ける
	var chkLen=5;
	if(event.keyCode != 0008){
		//指定の桁以上ならスタート
		if(value.length>=chkLen){
			var hikaku = value.substring(chkLen, chkLen+1);
			if(hikaku != "-"){
				var frontValue = value.substring(0, chkLen);
				var backValue  = value.substring(chkLen, value.length);
				sender.value=frontValue+"-"+backValue;
			}
		}
	}
	//小文字を大文字へ
	sender.value = sender.value.toUpperCase();
	value = sender.value;
	//-----------------------------------------------
	if ( value.length >= <%=formBean.getTanaKensu() %> ){
		if ( evt.keyCode == 37 || evt.keyCode == 39 ){

		}else{
			if ( timerId2 == null ){
				// 連続送信防止
				timerId2 = window.setTimeout(function(){text_onTimeOut2(object,sender,evt);},500);
			}
		}
	}
}

/**
* 一定時間入力が止まった場合に動作
*/
function text_onTimeOut2(object,sender,evt){
	var nowDateTime = new Date();
	var lngTime = (nowDateTime.getTime()-inputDateTime2.getTime());
	if ( lngTime >= 1000 ){
		timerId2 = null;
		xmlRequest2(object,sender,evt);
	}else{
		timerId2 = window.setTimeout(function(){text_onTimeOut2(eventSrc2.object,eventSrc2.sender,eventSrc2.evt);},500);
	}
}

/**
* XML要求処理
*/
function xmlRequest2(object,sender,evt){
	//alert_Custom(evt.keyCode);
	var table = document.getElementById("drop-contents2");
	table.innerHTML="";

	var top = calculateOffsetTop(sender);
	var left = calculateOffsetLeft(sender);
	var height = sender.offsetHeight;
	var panel = document.getElementById("dropdown-panel2");
	panel.style.top=top+height+"px";
	panel.style.left=left+"px";
	panel.style.display="block";

	var param="sysId=<%=GlobalConst.TANA%>&"+"value1="+sender.value+"";

	try {
		var frm = document.main;
		var objs = frm["invCate"];
		if (objs[1].checked == true){
			//仮入出庫
			param += "&afterProc=1";
		}
	} catch (e) {

	}

	object.doXmlRequest(object,sender,param);
}


/**
* リスト選択時コールバック処理
*/
function list_onSelect2(object,sender,json){
	var panel = document.getElementById("dropdown-panel2");
	panel.style.display="none";
	sender.focus();

	//----------
	var name=sender.name;
	var idx=name.substring(name.indexOf("[")+1,name.length-1);

	document.getElementById("findRackNo").value=json.value1;

}


function getElementsByClassName2(parent,tagName,className,fullMatch){
	var i=0,j=0;
	var result = [], cnt = 0;
	var list = parent.getElementsByTagName(tagName);
	for ( i=0; i<list.length; i++ ){
		var name = list[i].className;
		if ( name ){
			var nameList = name.split(' ');
			for ( j=0; j<nameList.length; j++ ){
				if ( fullMatch ){
					if ( nameList[j] == className ){
						result[cnt++] = list[i];
					}
				}else{
					if ( nameList[j].indexOf(className) != -1 ){
						result[cnt++] = list[i];
					}
				}
			}
		}
	}
	return result;
}
function closeBtn2(){
	var panel = document.getElementById("dropdown-panel2");
	panel.style.display="none";
}

//ページングリンクを押したときの処理
function wzdPager(pageNo) {
	var frm = document.forms["main"];

	frm.pageNo.value=pageNo;
	frm.submitFlag.value="1";
	frm.cmd.value='cmd01';
	frm.submit();

}
//----------------------------------------------------------------------

function findRsvDivChange(){
	var frm = document.forms["main"];
	//ページ番号初期化
	frm.pageNo.value ="1";
}

//クリアボタン
function findClearBtn(){
	location.href = "../spa1000/spa1000";
}
</script>

</head>

	<body onLoad="onInit()" style="margin: 0px 4px 0px 0px;">
		<form class="frmMain" name="main" id="F1" action="./spa1000" method="post" enctype="multipart/form-data" onsubmit="return false;">
			<input type="hidden" name="cmd" value="cmd01">
			<input type="hidden" name="submitFlag" value="0">
			<input type="hidden" id="nextPage" name="nextPage" value="">
			<input type="hidden" id="dataId" name="dataId" value="">
			<input type="hidden" id="dataSts" name="dataSts" value="">
			<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::ページング START:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
			<input type="hidden" name="pageNo" value="<%= nowPageNo %>">
			<input type="hidden" name="selectPageNo" value="<%=formBean.getSelectPageNo()%>">
			<!-- :::::::::::::::::::::::::::::::::::::::::::::::ページング END:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
			<!-- カラムソート -->
			<input type="hidden" name="columnSortText" value="<%=formBean.getColumnSortText()%>">
			<input type="hidden" name="columnSortSelect" value="">
			<table class="tblMain" width="100%" cellspacing="0" cellpadding="0" border="0">
				<tr>
					<td valign="top">
						<table class='main-width-tb'  cellspacing='0' cellpadding='0' border='0'><tr><td></td></tr></table>
						<table class='main-height-tb' cellspacing='0' cellpadding='0' border='0'><tr><td></td></tr></table>

						<!-- Header Menu START -->
						<div class="header-title">予備品管理システム(<%=formBean.kojou%>)</div>
						<!-- Header Menu END -->

						<!-- ***** [FORM] MAIN-FORM ***** -->
						<div id="lc-out" style="z-index: 0;">
							<div id="lc-in" style="z-index: 0">
								<div class="subtitle">予備品情報一覧画面</div>
								<table  border="0" style="width: 98%;">
									<tr>
										<td>

											<table  border="0" style="margin-left: 30px; width: 98%;" id="addTable" name="addTable">
												<tr>
													<td>区分：</td>
													<td colspan="3">
														<select name="findRsvDiv" id="findRsvDiv" class="selectStyle" style="width:400px;" onchange="findRsvDivChange();">
														<option value="0" <%=("0".equals(formBean.getFindRsvDiv()))?"selected":"" %>>直結看板予備品</option>
														<option value="1" <%=("1".equals(formBean.getFindRsvDiv()))?"selected":"" %>>直結看板以外予備品</option>
														</select>
													</td>
													<td colspan="4">&nbsp;</td>
													<td class="TxtLeft">
														<input type="image" src="../../common/img/pc/btn_clear_off.png" onclick="findClearBtn();" alt="クリア">
													</td>
												</tr>
												<!-- スペース -->
												<tr style="height: 5px;"><td></td></tr>
												<tr>
													<td>
														Y品番：
													</td>
													<td>
														<input id="findItemNo" type="text" class="item inputStyle txtmode3" style="width:200px;" name="findItemNo" value="<%=formBean.getFindItemNo()%>" maxlength="11">
													</td>
													<td >
														棚番：
													</td>
													<td>
														<input type="text" class="rackNo inputStyle txtmode3" style="width:200px;" name="findRackNo" id="findRackNo" value="<%=formBean.getFindRackNo()%>" maxlength="8"><br>
													</td>
													<td>
														品名
													</td>
													<td colspan="2">
														<input type="text" class="inputStyle txtmode1" style="width:300px;" name="findItemNm" id="findItemNm" value="<%=formBean.getFindItemNm()%>" maxlength="100">
													</td>
													<td>
														<input type="image" src="../../common/img/pc/btn_search_off.png" onclick="formSubmit();" alt="検索">
													</td>
													<td>
														<input type="image" src="../../common/img/pc/btn_back_off.png" onclick="nextPageJump('topmenu1000');">
													</td>
												</tr>
												<tr>
													<td colspan="3">&nbsp;</td>
													<td style="font-size: 14px;">
														<input type="checkbox"  class="" name="findRackNoFlg" id="findRackNoFlg" style="width: 42px; height:15px; "  value="1"<%=("1".equals(formBean.getFindRackNoFlg()) ? "checked":"") %>>
														棚番なしを非表示
													</td>
													<td colspan="4">&nbsp;</td>
												</tr>
												<!-- スペース -->
												<tr style="height: 5px;"><td></td></tr>
											</table>

										</td>
									</tr>
								</table>
							</div><!-- lc-in End -->
							<div id="lc-in_under" style="z-index: 0">
							<table  border="0" style="width: 100%; background-color: #D3D3D3;">
								<tr>
									<td>
									<table  border="0" style="width: 100%;">
										<tr>
											<td>
												<!-- 料金部  -->
												<table border="0" style="width: 1320px; margin-left: 30px;">
													<!-- スペース -->
													<tr style="height: 5px;"><td></td></tr>
													<!--人作業登録 -->
													<tr>
														<td style="width:80px;">総金額：</td>
														<td style="width:130px;">
															<input type="text" name="allPrice" id="allPrice" class="inputStyle ReadStyle txtRight" style="width:150px;color: black;" value="<%=formBean.getAllPrice().replace(" ","") %>" readonly>
														</td>
														<td style="width:20px;">円</td>
														<td style="width:20px;">&nbsp;</td>
														<td style="width:150px;">総カウント金額：</td>
														<td style="width:130px;" >
															<input type="text" name="allCountPrice" id="allCountPrice" class="inputStyle ReadStyle txtRight" style="width:150px;color: black;" value="<%=formBean.getAllCountPrice().replace(" ","") %>" readonly>
														</td>
														<td style="width:20px;">円</td>
														<td style="width:200px;">&nbsp;</td>

														<td class="txtright" style="width:300px;">
															<input type="image" src="../../common/img/pc/btn_new_insert_tyokketsu_off.png" onclick="nextPageJump('spa2000');" alt="新規登録(直結)">
															&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
															<input type="image" src="../../common/img/pc/btn_new_insert_tyokketsuigai_off.png" onclick="nextPageJump('spa2100');" alt="新規登録(直結以外)">
														</td>
														<td style="width:80px;">
															&nbsp;
														</td>
													</tr>
													<!-- スペース -->
													<tr style="height: 5px;"><td></td></tr>
												</table>
											</td>
										</tr>
									</table>
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::ページング START:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->

<%
int recordCount = 0;
if (recordList != null) {
	recordCount = recordList.length;
}
if ("1".equals(formBean.getSubmitFlag())&& recordCount > 0) {
%>
				<table id="tblPager" width=""  align="center">
					<tr align="left">
						<td id="tblPager2" align="right" width="">
				<%
					if(isMinPrev){
				%>
							<a id="pagerBtnLinkNoBorder" href="javascript:wzdPager(<%= stPage %>);"><<<</a>&nbsp;&nbsp;&nbsp;&nbsp;
				<%
					}
				%>
						</td>
						<td id="tblPager2" align="right" width="">
				<%
					if(isPrev){
				%>
							<a id="pagerBtnLinkNoBorder" href="javascript:wzdPager(<%= prevPageNo %>);">前へ</a>&nbsp;&nbsp;&nbsp;&nbsp;
				<%
					}
				%>
						</td>
						<td id="tblPager2" align="center" width="">
				<%
					for(int i=startLoopNum;i<endLoopNum;i++){
						Spa1000Bean.PagerData pageData = pagerDataList[i];

						if(nowPageNo == pageData.Page){
				%>
							&nbsp;<span id="pagerLinkBorder"><a id="pagerLink" name="<%= pageData.Page %>" href="javascript:wzdPager(<%= pageData.Page %>);"><%= pageData.Page %></a></span>&nbsp;
				<%
						}else{
				%>
							&nbsp;<span id="pagerBtnLinkBorder"><a id="pagerBtnLink" href="javascript:wzdPager(<%= pageData.Page %>);"><%= pageData.Page %></a></span>&nbsp;
				<%
						}
					}
				%>
						</td>

						<td id="tblPager2" align="left" width="">
				<%
					if(isNext){
				%>
&nbsp;&nbsp;&nbsp;&nbsp;
							<a id="pagerBtnLinkNoBorder" href="javascript:wzdPager(<%= nextPageNo %>);">次へ</a>
				<%
					}
				%>
						</td>
						<td id="tblPager2" align="left" width="">
				<%
					if(isMaxNext){
				%>
&nbsp;&nbsp;&nbsp;&nbsp;
							<a id="pagerBtnLinkNoBorder" href="javascript:wzdPager(<%= edPage %>);">>>></a>
				<%
					}
				%>
						</td>
					</tr>
				</table><br>
	<%}
 %>

<!-- :::::::::::::::::::::::::::::::::::::::::::::::ページング END:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->

									<table  border="0" style="width: 98%; " class="TxtCenter">
										<tr>
											<td>
												<table  border="1" class="data-grid"  style="width:1320px; height:30px;" >
													<thead>
														<tr>
															<th style="background-color: #CAE1FF;" class="TblField1">&nbsp;</th>
															<th style="background-color: #CAE1FF;" class="TblField2" onclick="changeColumnSort('item_no');">Y品番			<%=formBean.getSort().getSortText("item_no")%></th>
															<th style="background-color: #CAE1FF;" class="TblField3" onclick="changeColumnSort('srp.item_nm');">品名		<%=formBean.getSort().getSortText("srp.item_nm")%></th>
															<th style="background-color: #CAE1FF;" class="TblField4" onclick="changeColumnSort('srp.model');">型式			<%=formBean.getSort().getSortText("srp.model")%></th>
															<th style="background-color: #CAE1FF;" class="TblField5" onclick="changeColumnSort('rack_no');">棚番		<%=formBean.getSort().getSortText("rack_no")%></th>
															<th style="background-color: #CAE1FF;" class="TblField6" onclick="changeColumnSort('srp.unit_price');">単価	<%=formBean.getSort().getSortText("srp.unit_price")%></th>
															<th style="background-color: #CAE1FF;" class="TblField7" onclick="changeColumnSort('srp.basic_stock');">基準	<%=formBean.getSort().getSortText("srp.basic_stock")%></th>
															<th style="background-color: #CAE1FF;" class="TblField8" onclick="changeColumnSort('tdrs.new_stock');">新品	<%=formBean.getSort().getSortText("tdrs.new_stock")%></th>
															<th style="background-color: #CAE1FF;" class="TblField9" onclick="changeColumnSort('tdrs.used_stock');">中古	<%=formBean.getSort().getSortText("tdrs.used_stock")%></th>
															<th style="background-color: #CAE1FF;" class="TblField10">&nbsp;</th>
														</tr>
													</thead>
												</table>
												<div class="div-wid" id="div-wid">
<%if("1".equals(formBean.getSubmitFlag())){
		if ( recordList!=null) {
			if ( recordList.length == 0 ){
%>
												<table border="1" class="data-grid"  style="width:1320px; height:120px;">
													<tr>
														<td colspan="12">データが存在しません。</td>
													</tr>
												</table>
<%
			}
%>
												<table border="1" width="1320px" height="30px" class="data-grid">
<%
			for (int i=0; i<recordList.length; i++) {
				Spa1000Bean.Record record=recordList[i];
%>


													<tr style="background-color: <%=("true".equals(record.colorFlg))?"#FFFFFF":"" %>";>

														<td class="TblField1 txtCenter <%=record.disStyle%>" onclick="opInf.mhClick(this);">
															<!-- ２ページ目以降も連番で表示されるように計算 -->
															<%=(i+1)+((nowPageNo-1)*formBean.getLimit())%>
														</td>

														<td class="TblField2 <%=record.disStyle%>" ><%=record.itemNo%></td>
														<td class="TblField3 <%=record.disStyle%>"><%=record.itemNm%></td>
														<td class="TblField4 <%=record.disStyle%>"><%=record.model%></td>
														<td class="TblField5 <%=record.disStyle%>"><%=record.rackNo%></td>
														<td class="TblField6 txtRight <%=record.disStyle%>"><%=record.unitPrice%></td>
														<td class="TblField7 txtRight <%=record.disStyle%>"><%=record.basicStock%></td>
														<td class="TblField8 txtRight <%=record.disStyle%>"><%=record.newStock%></td>
														<td class="TblField9 txtRight <%=record.disStyle%>"><%=record.usedStock%></td>
														<td class="TblField10 TxtCenter <%=record.disStyle%>"><input type="button" value="変更" class="button" onclick="insertPageJump('<%=("0".equals(record.rsvDiv))?"spa2000":"spa2100" %>','<%=record.itemNo%>','<%=record.rsvDiv%>');"></td>

													</tr>
<%
			}
		}
%>
												</table>
											</div>
											</td>
										</tr>
									</table>
<%}%>
								</td>
							</tr>
						</table>
						</div><!-- lc-in_under End -->


							<!-- ログ Start -->
							<!-- ログ End -->

						</div><!-- lc-out  -->
					</td>
				</tr>
			</table>


<!-- ITEM-DROPDOWN START -->
<div class="dropdown-panel" id="dropdown-panel">
	<div class="dropdown-panel-in">
		<div class="header">
			<div style="float:left;width:100px;height:20px;">
				<table border=0>
					<tr>
						<td style="width:100px;height:20px;">品番</td>
					</tr>
				</table>
			</div>
			<div style="float:right;width:40px;text-align:right;">
				<button class="closebtn" type="button" onClick="closeBtn();" style="width:18px;height:17px; padding:0px;">
					<img src="../../common/js/dropdown/close.gif" alt="閉じる">
				</button>
			</div>
		</div>
		<div class="drop-contents" id="drop-contents">
		</div>
		<div class="footer"></div>
	</div>
</div>
<!-- ITEM-DROPDOWN END -->

<!-- RACKNO-DROPDOWN START -->
<div class="dropdown-panel" id="dropdown-panel2">
	<div class="dropdown-panel-in">
		<div class="header">
			<div style="float:left;width:100px;height:20px;">
				<table border=0>
					<tr>
						<td style="width:100px;height:20px;">棚番</td>
					</tr>
				</table>
			</div>
			<div style="float:right;width:40px;text-align:right;">
				<button class="closebtn" type="button" onClick="closeBtn2();" style="width:18px;height:17px; padding:0px;">
					<img src="../../common/js/dropdown/close.gif" alt="閉じる">
				</button>
			</div>
		</div>
		<div class="drop-contents" id="drop-contents2">
		</div>
		<div class="footer"></div>
	</div>
</div>
<!-- RACKNO-DROPDOWN END -->

<!--警告 ポップアップ---------------------------------------------------------------------------- -->
<div id="allbackgr" class="allbackgr" style="display:none;"></div>
<div class="opAlertBtn" id = "opAlertBtn" style="display:none;" ></div>
<div class="opAlertButton" id = "opAlertButton" style="display:none;" ></div>
<div class="opAlertTop" id = "opAlertTop" style="display:none; font-size:22px;">　予備品管理システム　</div>
<div class="opAlert" id = "opAlert" style="display:none;"></div>
<!-- -------------------------------------------------------------------------------------------- -->
		</form>
	</body>
</html>
